from selenium.webdriver.common.by import By

from base.app.base_page import BasePage


# 对象库层
# 对象库层
class IndexPage(BasePage):
    def __init__(self):
        super().__init__()
        # 频道区域
        self.channel_area = (By.CLASS_NAME, "android.widget.HorizontalScrollView")
        # 具体频道
        self.channel_name = (By.XPATH, "//*[contains(@text,'{}')]")

    # 找到频道区域
    def find_channel_area(self):
        return self.fd_em(self.channel_area)

    # 找到具体频道
    def find_channel_name(self, ch_name):
        return self.driver.find_element(self.channel_name[0], self.channel_name[1].format(ch_name))


class IndexHandle(BasePage):
    def __init__(self):
        super().__init__()


class IndexProxy:
    def __init__(self):
        pass
